#include "Utilities.h"


Utilities::Utilities(void)
{
}


Utilities::~Utilities(void)
{
}


void Utilities::InitNumberList( std::auto_ptr<AnalyzerSettingInterfaceNumberList>& TargetList, const char* Text[][2], U32 ActiveItem )
{
    TargetList.reset( new AnalyzerSettingInterfaceNumberList() );
    TargetList->SetTitleAndTooltip( Text[0][0], Text[0][1] );
    U32 TargetItem = 1;
    while( Text[TargetItem][0] != NULL )
    {
	    TargetList->AddNumber( TargetItem - 1, Text[TargetItem][0], Text[TargetItem][1] );
        TargetItem++;
    }
    TargetList->SetNumber(ActiveItem);
}


void Utilities::InitNormalTextField(  std::auto_ptr<AnalyzerSettingInterfaceText>& TargetText , const char* Text[][2], const char* DefaultText )
{
    TargetText.reset( new AnalyzerSettingInterfaceText() );
    TargetText->SetTitleAndTooltip( Text[0][0], Text[0][1] );   
    TargetText->SetTextType( AnalyzerSettingInterfaceText::NormalText);
    TargetText->SetText(DefaultText);
}
